package pers.zc.activiti.shejimoshi.guanchazhe.gcz3;

/**
 * @description job实现类
 * @Author Lin FuYuan
 * @date 2020/1/7
 */
public class JobImpl implements Job {
    //执行方法
    @Override
    public void run(Task task) {
        Entity entity = task.get();
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(entity.getId());
        System.out.println(entity.getName());
        System.out.println(entity.getStatus());
        System.out.println(entity.getResult());
        entity.setStatus("完成");
        System.out.println("--------------------------");
        task.update();
    }
}
